import { createRouter, createWebHashHistory } from 'vue-router'
const Home = () => import('../components/index.vue')
const My = () => import('../components/my.vue')
const Category = () => import('../components/category.vue')
const ShopCar = () => import('../components/shopCar.vue')

const routes = [
  {
    path: '/', component: Home, name: 'home',
    meta: { isShow: true }
  },
  {
    path: '/my', component: My,
    name: 'my', meta: { isShow: true, }
  },
  {
    path: '/category',
    component: Category, name: 'category',
    meta: { isShow: true }
  },
  {
    path: '/shopcar',
    component: ShopCar, name: 'shopcar', meta: { isShow: true }
  },
  {
    path: '/detail',
    component: () => import('../components/detail.vue'),

  },
  {
    path: '/more',
    component:()=>import('../components/more.vue')
  },
  {
    path: '/home',
    redirect: '/',
    meta: { isShow: true }
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})
export default router
